package com.young.core.dao;


import com.young.common.query.Pagination;
import com.young.common.query.Query;
import com.young.core.domain.TraceDO;

import java.util.Collection;
import java.util.Date;

public interface TraceDao {

    void insert(TraceDO trace);

    int update(TraceDO trace);

    Pagination<TraceDO> query(Query query);

    TraceDO get(String traceId);

    /**
     * 删除time之前的旧数据，trace默认保留14天
     * @param time
     * @return
     */
    int deleteExpired(Date time, Collection<String> excludes);

}
